Add pseudothickness to write_model_dataset for Omega#460
Add pseudothickness to write_model_dataset for Omega#460cbegeman wants to merge 16 commits intoE3SM-Project:mainfrom
Conversation
TestingOnly the |
cd69ef2 to
2f9231f
Compare
aa1e065 to
79baeb5
Compare
79baeb5 to
c32f147
Compare
|
Noting that this will need a rebase onto #489 |
c32f147 to
d0113fd
Compare
|
@xylar This is basically done so it would be good to get your review before you leave. I've tested the pr suite so all that's left on my list is rebase and clean up the docs. |
|
Great, I'll review this in an hour or so. |
d0113fd to
0a75bf2
Compare
| surface_pressure = 0. | ||
|
|
||
| # The reference density | ||
| rho0 = 1026. |
There was a problem hiding this comment.
We don't want this anymore, we need to use the approach introduced elsewhere in the code in #489, getting this from polaris.constants.get_constant().
|
|
||
|
|
||
| def geom_thickness_from_ds(ds, config): | ||
| rho0 = config.getfloat('vertical_grid', 'rho0') |
There was a problem hiding this comment.
Here and elsewehre, this needs to come instead from polaris.constants.get_constant().
| and 'PseudoThickness' not in ds.keys() | ||
| and config is not None | ||
| ): | ||
| ds['PseudoThickness'] = pseudothickness_from_ds(ds, config=config) |
There was a problem hiding this comment.
Until we make the name change, does this need to be called LayerThickness?
There was a problem hiding this comment.
Obviously I needed this change for testing but I cannot find the commit anywhere so I need to retest.
|
@xylar I was wrong that this was ready because I think we still need some PR to actually call Eos to compute SpecVol. I think the soonest one to be merged would be E3SM-Project/Omega#353. I also realized we might want to assume SpecVol=1/RhoSw so that PseudoThickness = LayerThickness for initial conditions where T,S don't need to be defined. |
Add the pseudo-thickness to model datasets for Omega initial conditions.
Surface pressure (constant value from config file), temperature, salinity and layer thickness are used to compute the pressure at layer interfaces. One iteration is currently used, pending testing of how many iterations is needed for convergence to desired accuracy.
The pressure at interfaces and a reference density (from config file) are then used to compute the pseudo-thickness.
The pseudo-thickness is automatically added to any
write_model_datasetcall when Omega is the ocean model AND the optional config argument is provided. (Note: checks for presence of config argument are still needed)Fixes #461
Depends on #440 for routines related to computing
p_interfacefrom model dataset.Depends on E3SM-Project/Omega#327 to rename
LayerThicknesstoPseudoThicknessOR we can map variable name
PseudoThickness(added to MPAS-O dataset before variable mapping) toLayerThicknessChecklist
api.md) has any new or modified class, method and/or functions listedTestingcomment in the PR documents testing used to verify the changes